/*
 *  testFork.c
 *  This test will attempt to launch 50 threads. Since the main is one thread it will 
 *	fail to launch the 50th thread. This shows that the Fork system call is working as desired.
 *
 */
#include "syscall.h"

int i;

void test1_thread1()
{
	int n=0;
	Write("*** Test 1, Thread 1 Function ***\n", sizeof("*** Test 1, Thread 1 Function ***\n"), ConsoleOutput);
	for(n=0;n<1;n++);
	Exit(0);
}

void test1_thread2()
{
	int n=0;
	Write("*** Test 1, Thread 2 Function ***\n", sizeof("*** Test 1, Thread 2 Function ***\n"), ConsoleOutput);
	for(n=0;n<1000;n++);
	Exit(0);
}

int main()
{
	int y=0;
	for(y=0;y<5;y++)
	{
		Fork(&test1_thread1, "test1_thread1", 13);
		Fork(&test1_thread2, "test1_thread2", 13);
	}
	Exit(0);
}


